]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notificationDaemon: Fix warning
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 23 Nov 2018 16:57:59 +0000 (17:57 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 16 Jan 2019 17:57:04 +0000 (18:57 +0100)
Since commit 33b8537bf5, we unconditionally access the 'image-path'
hint, resulting in a gjs warning if the hint is not defined.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/309

js/ui/notificationDaemon.js

index b897b8a71256894bb7f95d56c343b624fbc30ad1..0e5f8fcc2c11bb13a73dc5fee9bfa6e7cce11c69 100644 (file)
@@ -77,8 +77,10 @@ var FdoNotificationDaemon = new Lang.Class({
                  bitsPerSample, nChannels, data] = hints['image-data'];
             return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
                                                       bitsPerSample, width, height, rowStride);
+        } else if (hints['image-path']) {
+            return this._iconForNotificationData(hints['image-path'];
         }
-        return this._iconForNotificationData(hints['image-path']);
+        return null;
     },
 
     _fallbackIconForNotificationData(hints) {